﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;

namespace VentaElectrodomesticos.Datos
{
    public static class SHAEncrypt
    {
        public static string encode(string value)
        {
            var input = System.Text.Encoding.UTF8.GetBytes(value);
            using (var algorithm = System.Security.Cryptography.SHA256CryptoServiceProvider.Create())
            {
                var hashedBytes = algorithm.ComputeHash(input);
                return BitConverter.ToString(hashedBytes);
            }
        }

    }
}